package cn.bdqn.t354.entity;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

//@Component
////将配置文件信息和类进行映射
//@ConfigurationProperties(prefix = "person")

@Component
//将配置文件信息和类进行映射
@ConfigurationProperties(prefix = "person")
//指定配置文件的路劲
@PropertySource("classpath:abc.properties")
public class User {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
